package com.numberone.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.numberone.system.mapper.HomeLogoMapper;
import com.numberone.system.domain.HomeLogo;
import com.numberone.system.service.IHomeLogoService;
import com.numberone.common.support.Convert;

/**
 * 首页logo 服务层实现
 * 
 * @author numberone
 * @date 2020-09-25
 */
@Service
public class HomeLogoServiceImpl implements IHomeLogoService 
{
	@Autowired
	private HomeLogoMapper homeLogoMapper;

	/**
     * 查询首页logo信息
     * 
     * @param id 首页logoID
     * @return 首页logo信息
     */
    @Override
	public HomeLogo selectHomeLogoById(Long id)
	{
	    return homeLogoMapper.selectHomeLogoById(id);
	}
	
	/**
     * 查询首页logo列表
     * 
     * @param homeLogo 首页logo信息
     * @return 首页logo集合
     */
	@Override
	public List<HomeLogo> selectHomeLogoList(HomeLogo homeLogo)
	{
	    return homeLogoMapper.selectHomeLogoList(homeLogo);
	}
	
    /**
     * 新增首页logo
     * 
     * @param homeLogo 首页logo信息
     * @return 结果
     */
	@Override
	public int insertHomeLogo(HomeLogo homeLogo)
	{
	    return homeLogoMapper.insertHomeLogo(homeLogo);
	}
	
	/**
     * 修改首页logo
     * 
     * @param homeLogo 首页logo信息
     * @return 结果
     */
	@Override
	public int updateHomeLogo(HomeLogo homeLogo)
	{
	    return homeLogoMapper.updateHomeLogo(homeLogo);
	}

	/**
     * 删除首页logo对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteHomeLogoByIds(String ids)
	{
		return homeLogoMapper.deleteHomeLogoByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<HomeLogo> query() {
		return homeLogoMapper.selectByList();
	}

}
